﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SwaggerSdk
{    
    public class RspResult<T>
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public RspCode code { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public object info { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public T data { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        public object extras { get; set; }

        /// <summary>
        /// 时间
        /// </summary>
        public DateTime time { get; set; }
    }

    public enum RspCode
    {
        /// <summary>
        /// 成功
        /// </summary>
        ok = 200,
        /// <summary>
        /// token过期
        /// </summary>
        nologin = 401,
        /// <summary>
        /// 错误
        /// </summary>
        error = 400
    }
}
